#ifndef DOCUMENTSAVER_H
#define DOCUMENTSAVER_H

#include "documentserializer.h"

class DocumentSaver : public DocumentSerializer
{
    Q_OBJECT
public:
    explicit DocumentSaver(QObject *parent = 0);
private:
    void saveGraphicsObject(QPointer<GraphicsObject> gobject, QDataStream& out);
    void saveTexture(QPointer<Texture> texture, QDataStream& out);
    void saveAnimation(QPointer<Animation> gobject, QDataStream& out);
    void saveAnimationFrame(const AnimationFrame& frame, QDataStream& out);
    void saveCollisionShape(QPointer<CollisionShape> cshape, QDataStream& out);
signals:
    
public slots:
    bool serialize(const QString& filePath, QPointer<Document> document);
};

#endif // DOCUMENTSAVER_H
